import React from 'react'
import { ResultPage, Card,Button } from 'antd-mobile'
import { useSelector, useDispatch } from "react-redux";
import { useNavigate } from 'react-router-dom';
import { CapsuleTabs } from 'antd-mobile'
function Index() {
    const start = useSelector((store) => store.counter.start);
    const end = useSelector((store) => store.counter.end);
    const date = useSelector((store) => store.counter.date);
    const isSpeed = useSelector((store) => store.counter.isSpeed);
    const dispatch = useDispatch();
    const nav=useNavigate()
    const tz=()=>{
        nav(`/cart?start=${start}&end=${end}&date=${date}&isSpeed=${isSpeed}`)
    }
  return (
    <div>
        <ResultPage
      status='success'
      title='操作成功'
      description='内容详情可折行，建议不超过两行建议不超过两行建议不超过两行'
    >
      <ResultPage.Card style={{ height: 64, padding: 8 }}>
       <div>
        <Button  block color='primary' size='middle' onClick={tz}>查询</Button>
       </div>
      </ResultPage.Card>

      <Card style={{ height: 128, marginTop: 12 }}>
        
      <CapsuleTabs>
          <CapsuleTabs.Tab title='直达' key='fruits'>
            菠萝
          </CapsuleTabs.Tab>
          <CapsuleTabs.Tab title='机票' key='vegetables'>
            西红柿
          </CapsuleTabs.Tab>
          <CapsuleTabs.Tab title='汽车票' key='animals'>
            蚂蚁
          </CapsuleTabs.Tab>
          <CapsuleTabs.Tab title='中转' key='animal'>
            蚂蚁
          </CapsuleTabs.Tab>
        </CapsuleTabs>
      </Card>
    
    </ResultPage>
    </div>
  )
}

export default Index

